\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ul0\fs28 make dependencies header files\
\
Q: How can I get
\b make
\b0 to recompile my program when I've only edited one of the .h files? I've changed the class by editing the interface file, but it thinks the program is up to date. \
\
Q: Is there an easy way to recursively trace all the header files that my source file depends on?\
\
A: You can of course fool
\b make
\b0 by typing "
\f2 touch foo.m"
\f0 before compiling, but that's not a very elegant solution. What you need is a
\b Makefile.dependencies
\b0 file. This can be easily generated by typing "
\f2 make depend
\f0 ", assuming your Makefile was generated by Interface Builder. Makefile.dependencies will contain all the dependencies, listing the files included by your .m files. A typical line of this file will look something like:\
\b0 in this directory, whether from Interface Builder or a shell, it will check this file before deciding the program is up to date. Makefile.dependencies can also be edited by hand, if for any reason
\b make depend
\b0 doesn't do what you need. If you add new files to your project, you should delete Makefile.dependencies
\b
\b0 and regenerate it before recompiling.\
\
In answer to the second question,
\b cc
\b0 has a -M flag that can be useful if you want to see a listing of
\b all
\b0 the header files your source file depends on, including the appkit and operating system files. See the man page.\